package com.ruoyi.common.config;

import com.qiniu.storage.Region;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 七牛云 文件存储 配置类
 * 主要做云文件存储
 */

@Component
@ConfigurationProperties(prefix = "qiniu")
public class QiniuFileStoreConfig {
    /** 是否开启此功能*/
    private static Boolean enabled;
    /** 七牛云 接口凭证*/
    private static String accessKey;
    /** 七牛云 接口凭证*/
    private static String secretKey;
    /** 七牛云 空间名称*/
    private static String bucket;
    /** 七牛云 存储区域 */
    private static String storeRegion;
    /** 七牛云 资源访问域名 */
    private static String domain;
    /** 七牛云 当前项目文件存储根目录 */
    private static String rootDirectory;

    public static Boolean getEnabled() {
        return enabled;
    }
    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public static String getRootDirectory() {
        return rootDirectory;
    }

    public void setRootDirectory(String rootDirectory) {
        QiniuFileStoreConfig.rootDirectory = rootDirectory;
    }

    public static String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        QiniuFileStoreConfig.accessKey = accessKey;
    }

    public static String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        QiniuFileStoreConfig.secretKey = secretKey;
    }

    public static String getBucket() {
        return bucket;
    }

    public void setBucket(String bucket) {
        QiniuFileStoreConfig.bucket = bucket;
    }

    public static String getStoreRegion() {
        return storeRegion;
    }

    public void setStoreRegion(String storeRegion) {
        QiniuFileStoreConfig.storeRegion = storeRegion;
    }

    public static String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        QiniuFileStoreConfig.domain = domain;
    }

}
